test(windows): pin the real-process branch and the Arguments binding contract (#512) - #589
Merged
Merged
Conversation
…contract (#512) FOLLOWING_AGENTS_PROTOCOL Re-applied from row/ENG-RELEASE-WINDOWS-EMPTY-ARGS-FIX @ b00d619 onto current main. That branch was stacked on #583, and squash-merging #583 orphaned it -- mergeable=CONFLICTING -- because main now carries one squashed commit where the child's history expects the originals. Force-push is forbidden, so the delta is re-applied here instead of rewriting the branch. The resulting file is BYTE-IDENTICAL to the verified content: git diff b00d619 on this path is empty. Pins two properties #583 left unguarded. A fresh review found four mutations surviving its contract suite -- most importantly $exitCode = 0 in the real-process branch, and dropping the @ splat. Either means a future edit passes the contract suite SILENTLY while the Windows gate reports success for tests that failed or never ran. That is the failure class this repo keeps paying for, and it is the branch #583 restructured and the branch that surfaced #584. All four now RED: real-branch $exitCode = 0; dropped @ splat; dropped Mandatory; added AllowNull. The seven already caught stay caught, including the one that distinguishes "forwarded an empty array" from "forwarded nothing" -- @($null) has Count 1 and would otherwise sneak past. Two findings worth keeping. A naive omission test would HANG A DEVELOPER'S TERMINAL: an omitted mandatory parameter PROMPTS under an interactive console host, blocking on "Arguments[0]:" until killed at 25 s under a pty, and only reaches the binding error in CI where stdin is not a tty -- a test meaning one thing in CI and another on a desk. It is asserted in an API runspace instead, whose host cannot prompt, and the function under test is rebuilt from the live definition's own source text so it tracks edits to the real parameter block. And the @-splat mutation is nearly an equivalent mutant, disclosed rather than oversold: for a NATIVE executable the splatted and unsplatted forms give identical argv at 0, 1 and 3 elements under all three $PSNativeCommandArgumentPassing modes including Windows. It is only observable when the program is a PowerShell script, where an empty list otherwise arrives as one array argument instead of zero -- which is exactly #512's contract. The real-process arm drives the PowerShell host executing the script, resolved from (Get-Process -Id $PID).Path: the one executable guaranteed to exist wherever the script can run, so the IDENTICAL arm runs on Windows runners and POSIX boxes with no platform branch. An arm that silently no-ops on one platform would be its own version of the bug being fixed. Operator gate: contract suite rc=0 on this tree, and the previously-surviving real-branch mutation re-applied by hand fails with "real-process nonzero exit status was accepted", tree restored byte-for-byte afterwards. Still not green and not claimed to be: windows-msvc-cpu needs #584, vulkan needs #514, #585 remains filed. Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [Claude Code]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #588, which squash-merging #583 orphaned (
mergeable=CONFLICTING— main carries one squashed commit where the stacked child's history expects the originals). Force-push is forbidden, so the delta is re-applied onto current main. The file is byte-identical to the reviewed content —git diff b00d6199f -- scripts/build-windows-release.ps1is empty.A fresh review of #583 found four mutations surviving its contract suite. The two that matter:
$exitCode = 0in the real-process branch, and dropping the@splat. Either means a future edit passes the contract suite silently while the Windows gate reports success for tests that failed or never ran — and that is the branch #583 restructured, and the branch that surfaced #584.All four now RED. The seven already caught stay caught.
Two findings worth reading:
@-splat mutation is nearly an equivalent mutant, disclosed rather than oversold: for a native executable both forms give identical argv under all three argument-passing modes. It is only observable when the program is a PowerShell script — which is exactly Windows release runner rejects empty process arguments #512's contract.Operator gate: contract suite rc=0, and the previously-surviving mutation re-applied by hand fails with
real-process nonzero exit status was accepted.agent-preflight.sh --stagedgreen.Not claimed green:
windows-msvc-cpuneeds #584,windows-msvc-vulkanneeds #514.🤖 Generated with Claude Code